#include "sharemem.hpp"

int main()
{
    int shmid = getoldshm();
    char* poi = (char*)shmat(shmid,nullptr,0);
    cout<<"关联共享内存成功"<<endl;
    
    while (true)
    {
        string message;
        cout<<"客户端发送：";
        cin>>message;
        strcpy(poi,message.c_str());
    }
    shmdt(poi);
    return 0;
}